import { ColumnGroupType, ColumnType } from "antd/es/table"

import { renderNullableValue } from "./venueProfitAndLoss"

const rebateReconciliation = (newFormat: (arg: string) => string): Record<string, ColumnGroupType<any> | ColumnType<any>> => ({
	rebateReconciliationNetAt: {
		key: "netAt",
		dataIndex: "netAt",
		width: 120,
		render: renderNullableValue("netAt"),
		title: newFormat("report.rerecon_net_at"),
		align: "center",
		fixed: false
	},
	rebateReconciliationBetNo: {
		key: "betNo",
		dataIndex: "betNo",
		width: 200,
		render: renderNullableValue("betNo"),
		title: newFormat("report.rerecon_bet_no"),
		align: "center",
		fixed: false
	},
	rebateReconciliationBetTime: {
		key: "betTime",
		dataIndex: "betTime",
		width: 180,
		render: renderNullableValue("betTime"),
		title: newFormat("report.rerecon_bet_time"),
		align: "center",
		fixed: false
	},
	rebateReconciliationVenueTypeName: {
		key: "venueTypeName",
		dataIndex: "venueTypeName",
		width: 120,
		render: renderNullableValue("venueTypeName"),
		title: newFormat("report.rerecon_venue_type_name"),
		align: "center",
		fixed: false
	},
	rebateReconciliationVenueName: {
		key: "venueName",
		dataIndex: "venueName",
		width: 120,
		render: renderNullableValue("venueName"),
		title: newFormat("report.rerecon_venue_name"),
		align: "center",
		fixed: false
	},
	rebateReconciliationGameName: {
		key: "gameName",
		dataIndex: "gameName",
		width: 120,
		render: renderNullableValue("gameName"),
		title: newFormat("report.rerecon_game_name"),
		align: "center",
		fixed: false
	},
	rebateReconciliationGameAccount: {
		key: "gameAccount",
		dataIndex: "gameAccount",
		width: 120,
		render: renderNullableValue("gameAccount"),
		title: newFormat("report.rerecon_game_account"),
		align: "center",
		fixed: false
	},
	rebateReconciliationMemberAccount: {
		key: "memberAccount",
		dataIndex: "memberAccount",
		width: 120,
		render: renderNullableValue("memberAccount"),
		title: newFormat("report.rerecon_member_account"),
		align: "center",
		fixed: false
	},
	rebateReconciliationParentProxyName: {
		key: "parentProxyName",
		dataIndex: "parentProxyName",
		width: 120,
		render: renderNullableValue("parentProxyName"),
		title: newFormat("report.rerecon_parent_proxy_name"),
		align: "center",
		fixed: false
	},
	rebateReconciliationTopProxyName: {
		key: "topProxyName",
		dataIndex: "topProxyName",
		width: 120,
		render: renderNullableValue("topProxyName"),
		title: newFormat("report.rerecon_top_proxy_name"),
		align: "center",
		fixed: false
	},
	rebateReconciliationBetType: {
		key: "betType",
		dataIndex: "betType",
		width: 120,
		render: renderNullableValue("betType"),
		title: newFormat("report.rerecon_bet_type"),
		align: "center",
		fixed: false
	},
	rebateReconciliationBetAmount: {
		key: "betAmount",
		dataIndex: "betAmount",
		width: 120,
		render: renderNullableValue("betAmount", "$"),
		title: newFormat("report.rerecon_bet_amount"),
		align: "center",
		fixed: false
	},
	rebateReconciliationValidBetAmount: {
		key: "validBetAmount",
		dataIndex: "validBetAmount",
		width: 120,
		render: renderNullableValue("validBetAmount", "$"),
		title: newFormat("report.valid_bet_amount"),
		align: "center",
		fixed: false
	},
	rebateReconciliationMemberNetAmount: {
		key: "memberNetAmount",
		dataIndex: "memberNetAmount",
		width: 120,
		render: renderNullableValue("memberNetAmount"),
		title: newFormat("report.rerecon_member_net_amount"),
		align: "center",
		fixed: false
	},
	rebateReconciliationPlatformRebateRate: {
		key: "platformRebateRate",
		dataIndex: "platformRebateRate",
		width: 120,
		render: renderNullableValue("platformRebateRate", "", "", false, "%"),
		title: newFormat("report.rerecon_platform_rebate_rate"),
		align: "center",
		fixed: false
	},
	rebateReconciliationProxyRebateRate: {
		key: "proxyRebateRate",
		dataIndex: "proxyRebateRate",
		width: 120,
		render: renderNullableValue("proxyRebateRate", "", "", false, "%"),
		title: newFormat("report.rerecon_proxy_rebate_rate"),
		align: "center",
		fixed: false
	},
	rebateReconciliationRebateAmount: {
		key: "rebateAmount",
		dataIndex: "rebateAmount",
		width: 120,
		render: renderNullableValue("rebateAmount", "$"),
		title: newFormat("report.rerecon_rebate_amount"),
		align: "center",
		fixed: false
	},
	rebateReconciliationRealPlatformRebateRate: {
		key: "realPlatformRebateRate",
		dataIndex: "realPlatformRebateRate",
		width: 120,
		render: renderNullableValue("realPlatformRebateRate", "", "", false, "%"),
		title: newFormat("report.rerecon_real_platform_rebate_rate"),
		align: "center",
		fixed: false
	},
	rebateReconciliationRealProxyRebateRate: {
		key: "realProxyRebateRate",
		dataIndex: "realProxyRebateRate",
		width: 120,
		render: renderNullableValue("realProxyRebateRate", "", "", false, "%"),
		title: newFormat("report.rerecon_real_proxy_rebate_rate"),
		align: "center",
		fixed: false
	},
	rebateReconciliationRealRebateAmount: {
		key: "realRebateAmount",
		dataIndex: "realRebateAmount",
		width: 120,
		render: renderNullableValue("realRebateAmount", "$"),
		title: newFormat("report.rerecon_real_rebate_amount"),
		align: "center",
		fixed: false
	}
})

export default rebateReconciliation
